com.highdeal.pnr.hci
Class ChargeableItem

java.lang.Object
  extended by com.highdeal.pnr.hci.ChargeableItem
All Implemented Interfaces:
XMLMarshallable

public class ChargeableItem
extends java.lang.Object
implements XMLMarshallable

This Java class represents a chargeable item that is sent by your client applications or systems (mediation) and to be charged by the connected SAP CC Core Server system; This chargeable item represents data related to the usage (consumption) of a customer service. The service consumption relates to an end customer of the service provider; he want to use, is using, or has used the marketable service.

A chargeable item includes a set of custom properties sent by your client application. SAP Convergent Charging uses these properties to rate (dynamic pricing) and charge the usage. You can define some properties to be transmitted by SAP CC to the upstream systems like a billing system.

See Also:
Property, AsyncBatchServiceClient.acquire(..) for direct batch acquisition (asynchronous communications), (BatchServiceClient.acquire(..) for direct batch acquisition (synchronous communications)

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="ci">
   <xs:complexType>
    <xs:sequence>
      <xs:element ref="uid" minOccurs="0" maxOccurs="1"/>
      <xs:element ref="p" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="n" type="xs:string"/>
   </xs:complexType>
  </xs:element>


Constructor Summary
ChargeableItem()
          Constructs an empty chargeable item.
ChargeableItem(java.lang.String name)
          Constructs a chargeable item with an action name.
ChargeableItem(java.lang.String name, java.util.Vector<Property> properties)
          Constructs a completly defined chargeable item.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 void addProperty(Property property)
          Adds a new property to this chargeable item.
 ChargeableItem duplicate()
          Returns a new clone instance of this chargeable item.
 java.lang.String getName()
          Returns the name of the chargeable item.
 java.util.Vector<Property> getProperties()
          Returns the vector of the item properties.
 java.util.List<Property> getPropertiesAsList()
          Returns the list of the item properties.
 Property getProperty(java.lang.String propertyName)
          Returns the property which name is propertyName.
 UniqueIdentifier getUniqueIdentifier()
          Returns the unique identifier of the chargeable item.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void marshal(XMLOutputter output, java.lang.String tagName)
           
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setName(java.lang.String name)
          Sets the name of this chargeable item.
 void setUniqueIdentifier(UniqueIdentifier uid)
          Sets the unique identifier of the chargeable item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChargeableItem

public ChargeableItem()
Constructs an empty chargeable item.


ChargeableItem

public ChargeableItem(java.lang.String name)
Constructs a chargeable item with an action name.

Parameters:
name - The name of the chargeable item

ChargeableItem

public ChargeableItem(java.lang.String name,
                      java.util.Vector<Property> properties)
Constructs a completly defined chargeable item.

Parameters:
name - The name of the chargeable item
properties - The property set associated to this chargeable item
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of this chargeable item.

Parameters:
name - The name of the chargeable item

getName

public java.lang.String getName()
Returns the name of the chargeable item.

Returns:
The name of the chargeable item

setUniqueIdentifier

public void setUniqueIdentifier(UniqueIdentifier uid)
Sets the unique identifier of the chargeable item.

Parameters:
uid - The unique identifier of the chargeable item

getUniqueIdentifier

public UniqueIdentifier getUniqueIdentifier()
Returns the unique identifier of the chargeable item.

Returns:
The unique identifier of the chargeable item

addProperty

public void addProperty(Property property)
Adds a new property to this chargeable item.

Parameters:
property - The added property

getProperties

public java.util.Vector<Property> getProperties()
Returns the vector of the item properties.

Returns:
A vector of properties

getPropertiesAsList

public java.util.List<Property> getPropertiesAsList()
Returns the list of the item properties.

Returns:
A list of properties

getProperty

public Property getProperty(java.lang.String propertyName)
Returns the property which name is propertyName.

Parameters:
propertyName - The name of the requested property
Returns:
The requested property, or null if no such property exists in this chargeable item.

duplicate

public ChargeableItem duplicate()
Returns a new clone instance of this chargeable item.

Returns:
A new instance of this chargeable item

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

marshal

public void marshal(XMLOutputter output,
                    java.lang.String tagName)

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)